package com.project.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/count")
public class CountContoller extends GenericController {

	@RequestMapping(value = "/booktype")
	public String countBook(Model model) {
		model.addAttribute("list", bookInfoService.countBookType());
		return "count/booktype";
	}

	@RequestMapping(value = "/borrowbookrank")
	public String borrowBookRank(Model model) {
		model.addAttribute("list", borrowReturnInfoService.borrowBookRank());
		return "count/borrowbookrank";
	}

	@RequestMapping(value = "/readerborrowrank")
	public String readerBorrowRank(Model model) {
		model.addAttribute("list", borrowReturnInfoService.readerBorrowRank());
		return "count/readerborrowrank";
	}

}
